Disorders of perception, attention, and memory frequently accompany the major mental diseases. To understand the neural mechanisms of these mental processes, we are recording the activity of neurons in the extrastriate and prefrontal cortex of monkeys engaged in tasks requiring visual discrimination, attention, and memory. Attention is often thought of as a gateway to learning and memory because we typically learn and remember much more about stimuli in the environment that we attend to than about stimuli we ignore. However, the converse is equally true. That is, mechanisms for learning and memory play a critical role in the selection process that determines which stimuli of the many stimuli in a complex environment are attended. For visual memory, the inferior temporal, entorhinal, and prefrontal cortices appear to play a central role. One type of neuronal mechanism biases attention towards stimuli that are novel. Another type biased attention towards stimuli that are behaviorally relevant because they have been paired with reward. Another type biases attention towards stimuli that are actively held "in mind", i.e. held in working memory. Attentional shifts appear to occur when such memory processes influence competitive interactions among identified populations of cells in cortex visual. Recent evidence suggests that attentional shifts are mediated by synchronized activty of neurons carrying the relevant information in the brain.